import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        name: 'login',
        component: () => import('../components/Login.vue')
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('../components/myIndex.vue'),
        children:[
            {
                path:'/Home',
                name:'home',
                meta:{
                    title:'首页'
                },
                component:()=>import('../components/Home.vue')
            },
            {
                path:'/Admin',
                name:'admin',
                meta:{
                    title:'管理员'
                },
                component:()=>import('../components/amdin/adminManage.vue')
            },
            {
                path:'/User',
                name:'user',
                meta:{
                    title:'用户管理'
                },
                component:()=>import('../components/user/userManage.vue')
            },
            {
                path: '/storage',
                name: 'StorageManage',
                component: () => import('@/components/storage/StorageManage.vue')
            }

        ]
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;